﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.ServiceModel;
using Model.Entity;
using Ones.Dal.Infrastructure;
using Ones.Infrastructure.Utils.Pagination.Impl;

namespace Ones.Wcf.WebAdministration
{
    [ServiceContract]
    public interface IServiceAdvertisementManagement
    {
        #region Advertisement Block
        
        #region DMM
        
        [OperationContract]
        Boolean addAdvertisementBlock(AdvertisementBlock advertisementBlock);
        
        [OperationContract]
        Boolean updateAdvertisementBlock(AdvertisementBlock advertisementBlock);
        
        [OperationContract]
        Boolean deleteAdvertisementBlock(String blkId);

        #endregion

        #region DQM
        
        [OperationContract]
        List<AdvertisementBlock> searchAllAdvertisementBlocks();
        
        [OperationContract]
        AdvertisementBlock searchAdvertisementBlockById(String blkId);
        
        [OperationContract]
        List<AdvertisementBlock> searchAdvertisementBlockByActive(Boolean isActive);

        #endregion

        #endregion Advertisement Block

        #region Advertisement Contact
        
        #region DMM
        
        [OperationContract]
        Boolean addAdvertisementContact(AdvertisementContact advertisementContact);
        
        [OperationContract]
        Boolean updateAdvertisementContact(AdvertisementContact advertisementContact);
        
        [OperationContract]
        Boolean deteleAdvertisementContact(int advContId);
        
        #endregion
        
        #region DQM
        
        [OperationContract]
        List<AdvertisementContact> searchAllAdvertisementContacts();
        
        [OperationContract]
        AdvertisementContact searchAdvertisementContactById(int advContId);
        
        [OperationContract]
        List<AdvertisementContact> searchAdvertisementContactByName(String advContName);
        
        [OperationContract]
        List<AdvertisementContact> searchAdvertisementContactByCompany(String advContCompany);

        #endregion
        
        #endregion Advertisement Contact
        
        #region Advertisement
        
        #region DMM
        
        [OperationContract]
        Boolean addAdvertisment(Advertisement advertisement);
        
        [OperationContract]
        Boolean updateAdvertisement(Advertisement advertisement);
        
        [OperationContract]
        Boolean deteleAdvertisement(int advId);
        
        #endregion
        
        #region DQM
        
        [OperationContract]
        List<Advertisement>  searchAllAdvertisements();
        
        [OperationContract]
        Advertisement searchAdvertisementById(int advId);
        
        [OperationContract]
        List<Advertisement> searchAdvertisementByContact(int advContId);
        
        [OperationContract]
        List<Advertisement> searchAdvertisementByBlock(String blkId);
        
        #endregion
        
        #endregion Advertisement
        
        #region View Advertisement Detail
        
        [OperationContract]
        List<ViewAdvertisementDetail> searchAllAdvertisementDetails();

        #endregion View Advertisement Detail
        
        #region ///Paging///
        
        [OperationContract]
        PagingObject<Advertisement> getAdvertisement(int page);
        
        [OperationContract]
        PagingObject<Advertisement> searchAdvertisement(string searchBy, String key, int page);
        
        [OperationContract]
        LazyPagination<AdvertisementBlock> pagingAllAdvertisementBlocks(int pageNumber, int pageSize);
        
        [OperationContract]
        LazyPagination<AdvertisementContact> pagingAllAdvertisementContacts(int pageNumber, int pageSize);
        
        [OperationContract]
        LazyPagination<Advertisement> pagingAllAdvertisements(int pageNumber, int pageSize);
        
        [OperationContract]
        LazyPagination<ViewAdvertisementDetail> pagingAllAdvertisementDetails(int pageNumber, int pageSize);

        #endregion
    }
}